﻿@*@if (Request.IsAuthenticated)
{
    <text>
    Hello, @Html.ActionLink(User.Identity.Name, "Manage", "Account", routeValues: null, htmlAttributes: new { @class = "username", title = "Manage" })!
        @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" }))
        {
            @Html.AntiForgeryToken()
            <a href="javascript:document.getElementById('logoutForm').submit()">Log off</a>
        }
    </text>
}
else
{
    <ul>
        <li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
        <li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
    </ul>
}*@

@if (Request.Cookies["connect.sid"] != null)
{
    <form role="search" class="navbar-form navbar-left">
        <div class="form-group">
            <input type="text" placeholder="Where ?" class="form-control">
        </div>
    </form>

    <ul class="nav navbar-nav">
        <li><a href="signup.html">Dashboard</a>
        </li>

        <li class="dropdown">
            <a href="#" data-toggle="dropdown" class="dropdown-toggle">Pauline G.<b class="caret"></b>
                <img class="img-responsive" src="../../Content/img/profil.jpg" alt="" style="float: left; height: 24px; width: 24px; border-radius: 2px; margin-right: 8px; margin-top: 2px;">
            </a>
            <ul class="dropdown-menu">
                <li><a href="#">My Profile</a></li>
                <li><a href="#">Settings</a></li>
                <li class="divider"></li>
                @*<li><a href="#">Logout</a></li>*@
                <li>@Html.ActionLink("Logout", "LogOff", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
            </ul>
        </li>
        <li>
            <button class="btn btn-success" style="margin: 8px;" type="submit">
                List a rent
            </button>
        </li>
    </ul>

}
else
{
    <ul class="nav navbar-nav">
        <li>
            @Html.ActionLink("Sign Up", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })
        </li>
        <li>
            @Html.ActionLink("Log In", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
        </li>
        <li><a href="">List Your Rent</a>
        </li>
    </ul>
}
